package rs.dalao.syc.doctor.all.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import rs.dalao.syc.doctor.all.dao.persist.repository.IDoctorRepository;
import rs.dalao.syc.doctor.all.pojo.param.DoctorUpdateParam;
import rs.dalao.syc.doctor.all.pojo.vo.DoctorInfoVO;
import rs.dalao.syc.doctor.all.pojo.vo.UserPersonalListVO;
import rs.dalao.syc.doctor.all.service.IDoctorService;
@Service
public class IDoctorServiceImpl implements IDoctorService {
    @Autowired
    private IDoctorRepository doctorRepository;

    //跟新用户的个人资料
    @Override
    public int updateDoctorInfo(DoctorUpdateParam doctorUpdateParam, Long id) {
       return doctorRepository.updateDoctorInfo(doctorUpdateParam,id);
    }

    @Override
    public DoctorInfoVO selectById(Long id) {
        return doctorRepository.selectById(id);
    }

    @Override
    public UserPersonalListVO selectUserInfoByUsername(String userName) {
        return doctorRepository.selectUserInfoByUsername(userName);
    }
}
